<template>
  <div>
    <Oprate></Oprate>
    <hospitalTable v-if="isRouterAlive"></hospitalTable>
  </div>
</template>

<script>
  import bus from '../../../bus';
  import Oprate from '../../../Oprate/Oprate2'
  import hospitalTable from './hospitalTable'
  export default {
    components: {
      Oprate,hospitalTable
    },
    data() {
      return {
        isRouterAlive: true,
      }
    },
    created() {
      // 通过 Event Bus 进行组件间通信，来折叠侧边栏
      bus.$on('refresh', msg => {
        if(msg == true){
          this.isRouterAlive = false;
          this.$nextTick(() => (this.isRouterAlive = true))
        }
      })
    },
  }
</script>

<style scoped>

</style>

